Win32 changes, still doesn't build though.
authorTor Lillqvist <tml@iki.fi>
Tue, 11 Jul 2000 21:42:15 +0000 (21:42 +0000)
committerTor Lillqvist <tml@src.gnome.org>
Tue, 11 Jul 2000 21:42:15 +0000 (21:42 +0000)
2000-07-12  Tor Lillqvist  <tml@iki.fi>

Win32 changes, still doesn't build though.

* gdk/makefile.cygwin
* gdk/win32/makefile.cygwin
* gtk/makefile.cygwin: Updates.

* gdk/win32/gdkgc-win32.c (_gdk_win32_gc_new): Use the same
default values for fg and bg pixel as X11 does (0 and 1), not
black and white. Use PS_ENDCAP_FLAT and PS_JOIN_MITER by default.
Use 0 for pen width by default (treated as 1 anyway later, but for
apps that might check the value in the GdkGC).
(gdk_win32_hdc_get, gdk_win32_hdc_release): New functions, public
interface to gdk_gc_predraw and _postdraw.

* gdk/win32/gdkwin32.h
* gdk/gdk.def: Add gdk_win32_hdc_{get,release}.

* gdk/win32/gdkcolor-win32.c (gdk_colormap_alloc1): Remove
extraneous semicolon.

* gdk/win32/gdkdrawable-win32.c: Check also for pen_width == 0.

* gdk/win32/gdkimage-win32.c (gdk_image_new): Use the visual's depth,
not the Win32 bitspixel value.

18 files changed:
ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gdk/gdk.def
gdk/makefile.cygwin
gdk/win32/gdkcolor-win32.c
gdk/win32/gdkdrawable-win32.c
gdk/win32/gdkfont-win32.c
gdk/win32/gdkgc-win32.c
gdk/win32/gdkimage-win32.c
gdk/win32/gdkwin32.h
gdk/win32/makefile.cygwin
gdk/win32/makefile.msc
gtk/makefile.cygwin

index 895e93eb5f2b7e63db0fe766a721e70eb7fc9298..b76c3588ec867f498b746586cb188076f7d9a5d0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,30 @@
+2000-07-12  Tor Lillqvist  <tml@iki.fi>
+
+       Win32 changes, still doesn't build though.
+
+       * gdk/makefile.cygwin
+       * gdk/win32/makefile.cygwin
+       * gtk/makefile.cygwin: Updates.
+
+       * gdk/win32/gdkgc-win32.c (_gdk_win32_gc_new): Use the same
+       default values for fg and bg pixel as X11 does (0 and 1), not
+       black and white. Use PS_ENDCAP_FLAT and PS_JOIN_MITER by default.
+       Use 0 for pen width by default (treated as 1 anyway later, but for
+       apps that might check the value in the GdkGC).
+       (gdk_win32_hdc_get, gdk_win32_hdc_release): New functions, public
+       interface to gdk_gc_predraw and _postdraw.
+
+       * gdk/win32/gdkwin32.h
+       * gdk/gdk.def: Add gdk_win32_hdc_{get,release}.
+
+       * gdk/win32/gdkcolor-win32.c (gdk_colormap_alloc1): Remove
+       extraneous semicolon.
+
+       * gdk/win32/gdkdrawable-win32.c: Check also for pen_width == 0.
+
+       * gdk/win32/gdkimage-win32.c (gdk_image_new): Use the visual's depth,
+       not the Win32 bitspixel value.
+
 Tue Jul 11 20:59:35 2000  Tim Janik  <timj@gtk.org>
 
        * docs/tutorial/gtk_tut_12.es.sgml (name): 
index 895e93eb5f2b7e63db0fe766a721e70eb7fc9298..b76c3588ec867f498b746586cb188076f7d9a5d0 100644 (file)
@@ -1,3 +1,30 @@
+2000-07-12  Tor Lillqvist  <tml@iki.fi>
+
+       Win32 changes, still doesn't build though.
+
+       * gdk/makefile.cygwin
+       * gdk/win32/makefile.cygwin
+       * gtk/makefile.cygwin: Updates.
+
+       * gdk/win32/gdkgc-win32.c (_gdk_win32_gc_new): Use the same
+       default values for fg and bg pixel as X11 does (0 and 1), not
+       black and white. Use PS_ENDCAP_FLAT and PS_JOIN_MITER by default.
+       Use 0 for pen width by default (treated as 1 anyway later, but for
+       apps that might check the value in the GdkGC).
+       (gdk_win32_hdc_get, gdk_win32_hdc_release): New functions, public
+       interface to gdk_gc_predraw and _postdraw.
+
+       * gdk/win32/gdkwin32.h
+       * gdk/gdk.def: Add gdk_win32_hdc_{get,release}.
+
+       * gdk/win32/gdkcolor-win32.c (gdk_colormap_alloc1): Remove
+       extraneous semicolon.
+
+       * gdk/win32/gdkdrawable-win32.c: Check also for pen_width == 0.
+
+       * gdk/win32/gdkimage-win32.c (gdk_image_new): Use the visual's depth,
+       not the Win32 bitspixel value.
+
 Tue Jul 11 20:59:35 2000  Tim Janik  <timj@gtk.org>
 
        * docs/tutorial/gtk_tut_12.es.sgml (name): 
index 895e93eb5f2b7e63db0fe766a721e70eb7fc9298..b76c3588ec867f498b746586cb188076f7d9a5d0 100644 (file)
@@ -1,3 +1,30 @@
+2000-07-12  Tor Lillqvist  <tml@iki.fi>
+
+       Win32 changes, still doesn't build though.
+
+       * gdk/makefile.cygwin
+       * gdk/win32/makefile.cygwin
+       * gtk/makefile.cygwin: Updates.
+
+       * gdk/win32/gdkgc-win32.c (_gdk_win32_gc_new): Use the same
+       default values for fg and bg pixel as X11 does (0 and 1), not
+       black and white. Use PS_ENDCAP_FLAT and PS_JOIN_MITER by default.
+       Use 0 for pen width by default (treated as 1 anyway later, but for
+       apps that might check the value in the GdkGC).
+       (gdk_win32_hdc_get, gdk_win32_hdc_release): New functions, public
+       interface to gdk_gc_predraw and _postdraw.
+
+       * gdk/win32/gdkwin32.h
+       * gdk/gdk.def: Add gdk_win32_hdc_{get,release}.
+
+       * gdk/win32/gdkcolor-win32.c (gdk_colormap_alloc1): Remove
+       extraneous semicolon.
+
+       * gdk/win32/gdkdrawable-win32.c: Check also for pen_width == 0.
+
+       * gdk/win32/gdkimage-win32.c (gdk_image_new): Use the visual's depth,
+       not the Win32 bitspixel value.
+
 Tue Jul 11 20:59:35 2000  Tim Janik  <timj@gtk.org>
 
        * docs/tutorial/gtk_tut_12.es.sgml (name): 
index 895e93eb5f2b7e63db0fe766a721e70eb7fc9298..b76c3588ec867f498b746586cb188076f7d9a5d0 100644 (file)
@@ -1,3 +1,30 @@
+2000-07-12  Tor Lillqvist  <tml@iki.fi>
+
+       Win32 changes, still doesn't build though.
+
+       * gdk/makefile.cygwin
+       * gdk/win32/makefile.cygwin
+       * gtk/makefile.cygwin: Updates.
+
+       * gdk/win32/gdkgc-win32.c (_gdk_win32_gc_new): Use the same
+       default values for fg and bg pixel as X11 does (0 and 1), not
+       black and white. Use PS_ENDCAP_FLAT and PS_JOIN_MITER by default.
+       Use 0 for pen width by default (treated as 1 anyway later, but for
+       apps that might check the value in the GdkGC).
+       (gdk_win32_hdc_get, gdk_win32_hdc_release): New functions, public
+       interface to gdk_gc_predraw and _postdraw.
+
+       * gdk/win32/gdkwin32.h
+       * gdk/gdk.def: Add gdk_win32_hdc_{get,release}.
+
+       * gdk/win32/gdkcolor-win32.c (gdk_colormap_alloc1): Remove
+       extraneous semicolon.
+
+       * gdk/win32/gdkdrawable-win32.c: Check also for pen_width == 0.
+
+       * gdk/win32/gdkimage-win32.c (gdk_image_new): Use the visual's depth,
+       not the Win32 bitspixel value.
+
 Tue Jul 11 20:59:35 2000  Tim Janik  <timj@gtk.org>
 
        * docs/tutorial/gtk_tut_12.es.sgml (name): 
index 895e93eb5f2b7e63db0fe766a721e70eb7fc9298..b76c3588ec867f498b746586cb188076f7d9a5d0 100644 (file)
@@ -1,3 +1,30 @@
+2000-07-12  Tor Lillqvist  <tml@iki.fi>
+
+       Win32 changes, still doesn't build though.
+
+       * gdk/makefile.cygwin
+       * gdk/win32/makefile.cygwin
+       * gtk/makefile.cygwin: Updates.
+
+       * gdk/win32/gdkgc-win32.c (_gdk_win32_gc_new): Use the same
+       default values for fg and bg pixel as X11 does (0 and 1), not
+       black and white. Use PS_ENDCAP_FLAT and PS_JOIN_MITER by default.
+       Use 0 for pen width by default (treated as 1 anyway later, but for
+       apps that might check the value in the GdkGC).
+       (gdk_win32_hdc_get, gdk_win32_hdc_release): New functions, public
+       interface to gdk_gc_predraw and _postdraw.
+
+       * gdk/win32/gdkwin32.h
+       * gdk/gdk.def: Add gdk_win32_hdc_{get,release}.
+
+       * gdk/win32/gdkcolor-win32.c (gdk_colormap_alloc1): Remove
+       extraneous semicolon.
+
+       * gdk/win32/gdkdrawable-win32.c: Check also for pen_width == 0.
+
+       * gdk/win32/gdkimage-win32.c (gdk_image_new): Use the visual's depth,
+       not the Win32 bitspixel value.
+
 Tue Jul 11 20:59:35 2000  Tim Janik  <timj@gtk.org>
 
        * docs/tutorial/gtk_tut_12.es.sgml (name): 
index 895e93eb5f2b7e63db0fe766a721e70eb7fc9298..b76c3588ec867f498b746586cb188076f7d9a5d0 100644 (file)
@@ -1,3 +1,30 @@
+2000-07-12  Tor Lillqvist  <tml@iki.fi>
+
+       Win32 changes, still doesn't build though.
+
+       * gdk/makefile.cygwin
+       * gdk/win32/makefile.cygwin
+       * gtk/makefile.cygwin: Updates.
+
+       * gdk/win32/gdkgc-win32.c (_gdk_win32_gc_new): Use the same
+       default values for fg and bg pixel as X11 does (0 and 1), not
+       black and white. Use PS_ENDCAP_FLAT and PS_JOIN_MITER by default.
+       Use 0 for pen width by default (treated as 1 anyway later, but for
+       apps that might check the value in the GdkGC).
+       (gdk_win32_hdc_get, gdk_win32_hdc_release): New functions, public
+       interface to gdk_gc_predraw and _postdraw.
+
+       * gdk/win32/gdkwin32.h
+       * gdk/gdk.def: Add gdk_win32_hdc_{get,release}.
+
+       * gdk/win32/gdkcolor-win32.c (gdk_colormap_alloc1): Remove
+       extraneous semicolon.
+
+       * gdk/win32/gdkdrawable-win32.c: Check also for pen_width == 0.
+
+       * gdk/win32/gdkimage-win32.c (gdk_image_new): Use the visual's depth,
+       not the Win32 bitspixel value.
+
 Tue Jul 11 20:59:35 2000  Tim Janik  <timj@gtk.org>
 
        * docs/tutorial/gtk_tut_12.es.sgml (name): 
index 895e93eb5f2b7e63db0fe766a721e70eb7fc9298..b76c3588ec867f498b746586cb188076f7d9a5d0 100644 (file)
@@ -1,3 +1,30 @@
+2000-07-12  Tor Lillqvist  <tml@iki.fi>
+
+       Win32 changes, still doesn't build though.
+
+       * gdk/makefile.cygwin
+       * gdk/win32/makefile.cygwin
+       * gtk/makefile.cygwin: Updates.
+
+       * gdk/win32/gdkgc-win32.c (_gdk_win32_gc_new): Use the same
+       default values for fg and bg pixel as X11 does (0 and 1), not
+       black and white. Use PS_ENDCAP_FLAT and PS_JOIN_MITER by default.
+       Use 0 for pen width by default (treated as 1 anyway later, but for
+       apps that might check the value in the GdkGC).
+       (gdk_win32_hdc_get, gdk_win32_hdc_release): New functions, public
+       interface to gdk_gc_predraw and _postdraw.
+
+       * gdk/win32/gdkwin32.h
+       * gdk/gdk.def: Add gdk_win32_hdc_{get,release}.
+
+       * gdk/win32/gdkcolor-win32.c (gdk_colormap_alloc1): Remove
+       extraneous semicolon.
+
+       * gdk/win32/gdkdrawable-win32.c: Check also for pen_width == 0.
+
+       * gdk/win32/gdkimage-win32.c (gdk_image_new): Use the visual's depth,
+       not the Win32 bitspixel value.
+
 Tue Jul 11 20:59:35 2000  Tim Janik  <timj@gtk.org>
 
        * docs/tutorial/gtk_tut_12.es.sgml (name): 
index 78bb1c369f9e05a50cf8f2e71f244f4fbfde1737..da3f80315eb976a64d20467bccba98d86d2ac9f7 100644 (file)
@@ -285,6 +285,8 @@ EXPORTS
        gdk_visual_ref
        gdk_visual_unref
        gdk_wcstombs
+       gdk_win32_hdc_get
+       gdk_win32_hdc_release
        gdk_window_add_filter
        gdk_window_at_pointer
        gdk_window_begin_paint_rect
index 5101999f5338d87c93edd55f31986b2a0c39ffb2..045b83942b04c9d658a8ae28ec7beebc39bfbd72 100644 (file)
@@ -8,19 +8,17 @@
 
 OPTIMIZE = -g
 
-################################################################
-
-# Nothing much configurable below
+TOP = ../..
 
-CC = gcc -mno-cygwin -mpentium -fnative-struct
+include $(TOP)/build/win32/make.mingw
 
-CP = cp
+################################################################
 
-GLIB_VER=1.3
-GTK_VER=1.3
+# Nothing much configurable below
 
-GLIB = ../../glib
-CFLAGS = $(OPTIMIZE) -I . -I .. -I $(GLIB) -DG_ENABLE_DEBUG -DHAVE_CONFIG_H -DGDK_VERSION=\"$(GTK_VER)\"
+INCLUDES = -I . -I .. -I ../gdk-pixbuf
+DEPCFLAGS = $(GLIB_CFLAGS) $(PANGO_CFLAGS)
+DEFINES = -DG_ENABLE_DEBUG -DHAVE_CONFIG_H -DGDK_VERSION=\"$(GTK_VER)\"
 
 all: \
        ../config.h \
@@ -37,26 +35,22 @@ gdk_OBJECTS = \
        gdkgc.o         \
        gdkglobals.o    \
        gdkimage.o      \
+       gdkkeyuni.o     \
+       gdkpango.o      \
+       gdkpixbuf-drawable.o \
+       gdkpixbuf-render.o \
+       gdkpixmap.o     \
+       gdkpolyreg-generic.o \
        gdkrgb.o        \
        gdkrectangle.o  \
+       gdkregion-generic.o \
        gdkwindow.o
 
 ../config.h : ../config.h.win32
-       $(CP) ../config.h.win32 ../config.h
+       cp $< $@
 
 gdkconfig.h : gdkconfig.h.win32
-       $(CP) gdkconfig.h.win32 gdkconfig.h
+       cp $< $@
 
 gdk-$(GTK_VER).dll : $(gdk_OBJECTS) gdk.def win32/libgdk-win32.a win32/gdk-win32res.o
-       $(GLIB)/build-dll gdk $(GTK_VER) gdk.def $(gdk_OBJECTS) -L win32 -lgdk-win32 -lwntab32x -L $(GLIB) -lglib-$(GLIB_VER) -lgdi32 -luser32 -limm32 -lshell32 -lole32 -luuid $(LDFLAGS) win32/gdk-win32res.o 
-
-.SUFFIXES: .c .o .i
-
-.c.o :
-       $(CC) $(CFLAGS) -c -DGDK_COMPILATION -DG_LOG_DOMAIN=\"Gdk\" $<
-
-.c.i :
-       $(CC) $(CFLAGS) -E -DGDK_COMPILATION -DG_LOG_DOMAIN=\"Gdk\" $< >$@
-
-clean:
-       -rm *.exe *.o *.dll *.a *.exp *.base
+       $(GLIB)/build-dll gdk $(GTK_VER) gdk.def $(gdk_OBJECTS) -L win32 -lgdk-win32 -lwntab32x $(GLIB_LIBS) -lgdi32 -luser32 -limm32 -lshell32 -lole32 -luuid $(LDFLAGS) win32/gdk-win32res.o 
index e6b55d2e466d23d2725884cf4aba10e54a9260a3..0f46f7ec1acc5eff5e6f8f8cb08b296fac71ce0b 100644 (file)
@@ -1727,7 +1727,7 @@ gdk_colormap_alloc1 (GdkColormap *colormap,
   if (alloc_color (private->xcolormap, &xcolor, &ret->pixel))
     {
       ret->red = (xcolor.peRed * 65535) / 255;
-      ret->green = (xcolor.peGreen * 65535) / 255;;
+      ret->green = (xcolor.peGreen * 65535) / 255;
       ret->blue = (xcolor.peBlue * 65535) / 255;
       
       if ((guint) ret->pixel < colormap->size)
index 4d950f47b785215e2de9017854feb5ac26225cbf..37abf2db756b309d8d91baa00906359225090a74 100644 (file)
@@ -791,7 +791,7 @@ gdk_win32_draw_segments (GdkDrawable *drawable,
            WIN32_GDI_FAILED ("LineTo"), ok = FALSE;
          
          /* Draw end pixel */
-         if (ok && gc_data->pen_width == 1)
+         if (ok && gc_data->pen_width <= 1)
            if (!LineTo (hdc, segs[i].x2 + 1, segs[i].y2))
              WIN32_GDI_FAILED ("LineTo"), ok = FALSE;
        }
@@ -819,7 +819,7 @@ gdk_win32_draw_segments (GdkDrawable *drawable,
            WIN32_GDI_FAILED ("LineTo");
          
          /* Draw end pixel */
-         if (gc_data->pen_width == 1)
+         if (gc_data->pen_width <= 1)
            if (!LineTo (hdc, segs[i].x2 + 1, segs[i].y2))
              WIN32_GDI_FAILED ("LineTo");
        }
@@ -859,7 +859,7 @@ gdk_win32_draw_lines (GdkDrawable *drawable,
   g_free (pts);
   
   /* Draw end pixel */
-  if (gc_data->pen_width == 1)
+  if (gc_data->pen_width <= 1)
     {
       MoveToEx (hdc, points[npoints-1].x, points[npoints-1].y, NULL);
       if (!LineTo (hdc, points[npoints-1].x + 1, points[npoints-1].y))
@@ -876,7 +876,7 @@ gdk_win32_draw_lines (GdkDrawable *drawable,
    * we draw the end pixel separately... With wider pens we don't care.
    * //HB: But the NT developers don't read their API documentation ...
    */
-  if (gc_data->pen_width == 1 && windows_version > 0x80000000)
+  if (gc_data->pen_width <= 1 && windows_version > 0x80000000)
     if (!LineTo (hdc, points[npoints-1].x + 1, points[npoints-1].y))
       WIN32_GDI_FAILED ("LineTo");
 #endif 
index ad87a15eb6f4c7bc577f3fcf21d1d4c70a30f05b..db8c2067a8c21addbb616f59594a3e3de87be608 100644 (file)
@@ -454,7 +454,7 @@ gdk_font_list_free (gchar **font_list)
  * Blocks.txt from ftp.unicode.org. The bit number field is the bitfield
  * number as in the FONTSIGNATURE struct's fsUsb field.
  * There are some grave bugs in the table in the books. For instance
- * it claims there are Hangul  at U+3400..U+4DFF while this range in
+ * it claims there are Hangul at U+3400..U+4DFF while this range in
  * fact contains CJK Unified Ideographs Extension A. Also, the whole
  * block of Hangul Syllables U+AC00..U+D7A3 is missing from the book.
  */
index 0c7eb5c19b7d055471ad603e917219c0a6d8ce40..dd14b4ae8cf5ec36b8f26cf9f5d4890a857b85c7 100644 (file)
@@ -411,16 +411,6 @@ _gdk_win32_gc_new (GdkDrawable       *drawable,
   GdkGC *gc;
   GdkGCPrivate *private;
   GdkGCWin32Data *data;
-  static GdkColor black;
-  static GdkColor white;
-  static gboolean beenhere = FALSE;
-
-  if (!beenhere)
-    {
-      gdk_color_black (gdk_colormap_get_system (), &black);
-      gdk_color_white (gdk_colormap_get_system (), &white);
-      beenhere = TRUE;
-    }
 
   gc = gdk_gc_alloc ();
   private = (GdkGCPrivate *)gc;
@@ -430,15 +420,18 @@ _gdk_win32_gc_new (GdkDrawable      *drawable,
     
   data->clip_region = NULL;
 
-  data->foreground = black.pixel;
-  data->background = white.pixel;
+  /* Use the same default values as X11 does, even if they don't make
+   * sense per se. But apps always set fg and bg anyway.
+   */
+  data->foreground = 0;
+  data->background = 1;
   data->font = NULL;
   data->rop2 = R2_COPYPEN;
   data->fill_style = GDK_SOLID;
   data->tile = NULL;
   data->stipple = NULL;
-  data->pen_style = PS_GEOMETRIC;
-  data->pen_width = 1;
+  data->pen_style = PS_GEOMETRIC|PS_ENDCAP_FLAT|PS_JOIN_MITER;
+  data->pen_width = 0;
 
   data->values_mask = GDK_GC_FUNCTION | GDK_GC_FILL;
 
@@ -829,7 +822,8 @@ predraw_set_foreground (GdkGCPrivate            *gc_private,
   logbrush.lbStyle = BS_SOLID;
   logbrush.lbColor = fg;
 
-  if (*ok && (hpen = ExtCreatePen (data->pen_style, data->pen_width,
+  if (*ok && (hpen = ExtCreatePen (data->pen_style,
+                                  (data->pen_width > 0 ? data->pen_width : 1),
                                   &logbrush, 0, NULL)) == NULL)
     WIN32_GDI_FAILED ("ExtCreatePen");
   
@@ -1112,6 +1106,22 @@ gdk_gc_postdraw (GdkDrawable    *drawable,
   data->xgc = NULL;
 }
 
+HDC
+gdk_win32_hdc_get (GdkDrawable     *drawable,
+                  GdkGC           *gc,
+                  GdkGCValuesMask usage)
+{
+  return gdk_gc_predraw (drawable, (GdkGCPrivate *) gc, usage);
+}
+
+void
+gdk_win32_hdc_release (GdkDrawable     *drawable,
+                      GdkGC           *gc,
+                      GdkGCValuesMask usage)
+{
+  gdk_gc_postdraw (drawable, (GdkGCPrivate *) gc, usage);
+}
+
 /* This function originally from Jean-Edouard Lachand-Robert, and
  * available at www.codeguru.com. Simplified for our needs, now
  * handles just one-bit deep bitmaps (in Window parlance, ie those
index 57e342a93dfbaa361e07ab28bb67a596e2b14466..a05f17db9aebcf8cd29796c298430eba7f89134d 100644 (file)
@@ -285,9 +285,8 @@ gdk_image_new (GdkImageType  type,
               gint          width,
               gint          height)
 {
-  GdkVisualPrivate *visual_private = (GdkVisualPrivate *) visual;
   return gdk_image_new_with_depth (type, visual, width, height,
-                                  visual_private->xvisual->bitspixel);
+                                  visual->depth);
 }
 
 GdkImage*
index 70e63f21cbbf94c85fa3b2b5d68b0fdfa4ae6b49..323e894880beaea51205acd1d3d7340ff5801e7b 100644 (file)
@@ -316,7 +316,6 @@ struct _GdkVisualPrivate
 
 struct _GdkColormapPrivateWin32
 {
-  GdkColormapPrivate base;
   Colormap xcolormap;
   gint private_val;
 
@@ -327,7 +326,6 @@ struct _GdkColormapPrivateWin32
 
 struct _GdkImagePrivateWin32
 {
-  GdkImagePrivate base;
   HBITMAP ximage;
 };
 
@@ -353,4 +351,21 @@ GdkWindow    *gdk_window_foreign_new (guint32     anid);
 /* Return the Gdk* for a particular HANDLE */
 gpointer      gdk_xid_table_lookup     (HANDLE handle);
 
+/* Return a device context to draw in a drawable, given a GDK GC,
+ * and a mask indicating which GC values might be used (for efficiency,
+ * no need to muck around with text-related stuff if we aren't going
+ * to output text, for instance).
+ */
+HDC           gdk_win32_hdc_get (GdkDrawable    *drawable,
+                                GdkGC          *gc,
+                                GdkGCValuesMask usage);
+
+
+/* Each HDC returned from gdk_win32_hdc_get must be released with
+ * this function
+ */
+void          gdk_win32_hdc_release (GdkDrawable    *drawable,
+                                    GdkGC          *gc,
+                                    GdkGCValuesMask usage);
+
 #endif /* __GDK_WIN32_H__ */
index f6f0d1b62f5e7d941c7d8a3fa72bc378c48ce219..5d33ea042fb7babdb14ce2222dd142bc83163a4d 100644 (file)
@@ -7,17 +7,17 @@ WTKIT = ../../../wtkit126
 
 OPTIMIZE = -g
 
-################################################################
+TOP = ../../..
 
-# Nothing much configurable below
+include $(TOP)/build/win32/make.mingw
 
-CC = gcc -mno-cygwin -mpentium -fnative-struct
+################################################################
 
-GLIB_VER=1.3
-GTK_VER=1.3
+# Nothing much configurable below
 
-GLIB = ../../../glib
-CFLAGS = $(OPTIMIZE) -I . -I .. -I ../.. -I $(WTKIT)/include -I $(GLIB) -DG_ENABLE_DEBUG -DHAVE_CONFIG_H -DGDK_VERSION=\"$(GTK_VER)\"
+INCLUDES = -I ../.. -I .. -I $(WTKIT)/include
+DEPCFLAGS = $(GLIB_CFLAGS) $(PANGO_CFLAGS)
+DEFINES =  -DG_ENABLE_DEBUG -DHAVE_CONFIG_H -DGDK_VERSION=\"$(GTK_VER)\"
 
 all: \
        ../../config.h \
@@ -43,8 +43,6 @@ gdk_win32_OBJECTS = \
        gdkmain-win32.o \
        gdkpixmap-win32.o \
        gdkproperty-win32.o \
-       gdkpolyreg-generic.o \
-       gdkregion-generic.o \
        gdkselection-win32.o \
        gdkvisual-win32.o \
        gdkwin32id.o \
@@ -56,21 +54,6 @@ gdk_win32_OBJECTS = \
 ../gdkconfig.h : ../gdkconfig.h.win32
        cp $< $@
 
-gdkregion-generic.c: ../x11/gdkregion-generic.c
-       cp $< $@
-
-gdkpolyreg-generic.c: ../x11/gdkpolyreg-generic.c
-       cp $< $@
-
-gdkregion-generic.h: ../x11/gdkregion-generic.h
-       cp $< $@
-
-gdkpoly-generic.h: ../x11/gdkpoly-generic.h
-       cp $< $@
-
-gdkgc-win32.o:: gdkregion-generic.h
-gdkpolyreg-generic.o:: gdkpoly-generic.h
-
 # Kludge to get the path to the win32 headers
 WIN32APIHEADERS = $(shell echo "\#include <winver.h>" | $(CC) -M -E - | tail -1 | sed -e 's![\\/]winver.h!!' | tr -d '\015')
 
@@ -99,14 +82,3 @@ libgdk-win32.a : $(gdk_win32_OBJECTS)
 
 libwntab32x.a : $(WTKIT)/lib/i386/wntab32x.lib
        cp $(WTKIT)/lib/i386/wntab32x.lib libwntab32x.a
-
-.SUFFIXES: .c .o .i
-
-.c.o :
-       $(CC) $(CFLAGS) -c -DGDK_COMPILATION -DG_LOG_DOMAIN=\"Gdk\" $<
-
-.c.i :
-       $(CC) $(CFLAGS) -E -DGDK_COMPILATION -DG_LOG_DOMAIN=\"Gdk\" $< >$@
-
-clean:
-       -rm *.exe *.o *.dll *.a *.exp *.base
index d384967ffc6827d188e5d63180f3229771688b72..5a853444c4b7a9ec8635550efbe2780489fdab6c 100644 (file)
@@ -51,8 +51,6 @@ gdk_win32_OBJECTS = \
        gdkpixmap-win32.obj \
        gdkproperty-win32.obj \
        gdkregion-win32.obj \
-       gdkpolyreg-generic.obj \
-       gdkregion-generic.obj \
        gdkselection-win32.obj \
        gdkvisual-win32.obj \
        gdkwin32id.obj \
@@ -64,21 +62,6 @@ gdk_win32_OBJECTS = \
 ..\gdkconfig.h : ..\gdkconfig.h.win32
        copy ..\gdkconfig.h.win32 ..\gdkconfig.h
 
-gdkregion-generic.c: ..\x11\gdkregion-generic.c
-       copy ..\x11\gdkregion-generic.c gdkregion-generic.c
-
-gdkpolyreg-generic.c: ..\x11\gdkpolyreg-generic.c
-       copy ..\x11\gdkpolyreg-generic.c gdkpolyreg-generic.c
-
-gdkregion-generic.h: ..\x11\gdkregion-generic.h
-       copy ..\x11\gdkregion-generic.h gdkregion-generic.h
-
-gdkpoly-generic.h: ..\x11\gdkpoly-generic.h
-       copy ..\x11\gdkpoly-generic.h gdkpoly-generic.h
-
-gdkgc-win32.o:: gdkregion-generic.h
-gdkpolyreg-generic.o:: gdkpoly-generic.h
-
 gdk.res : rc\gdk.rc
        rc -DBUILDNUMBER=0 -r -fo gdk.res rc\gdk.rc
 
index b1339a118ea34ccda0fb9735d7412be5873a44a5..146647c91d35dd5c2041ba5b3516999e9bafdf8c 100644 (file)
@@ -12,25 +12,24 @@ PTHREAD_INC = -I $(PTHREADS)
 
 OPTIMIZE = -g
 
+TOP = ../..
+
+include $(TOP)/build/win32/make.mingw
+
 ################################################################
 
 # Nothing much configurable below
 
-CC = gcc -mno-cygwin -mpentium -fnative-struct
-
 # Perl and awk are needed to generate some source files.
-# These generated source files are distribuyted with the Win32 GTk+ source
+# These generated source files are distributed with the Win32 GTk+ source
 # distributions, so don't worry if you don't have perl and awk.
 PERL = perl
 AWK = awk
 
-GLIB_VER=1.3
-GTK_VER=1.3
-
-GLIB = ../../glib
-INTL = ../../intl
+INCLUDES = -I . -I .. -I ../gdk -I $(GLIB) -I $(GLIB)/gmodule -I $(INTL)
+DEFINES = -DGTK_DISABLE_COMPAT_H -DGTK_COMPILATION -DG_LOG_DOMAIN=\"Gtk\" -DG_LOG_DOMAIN=\"Gtk\" 
 
-CFLAGS = $(OPTIMIZE) -I . -I .. -I ../gdk -I $(GLIB) -I $(GLIB)/gmodule -I $(INTL) -DGTK_DISABLE_COMPAT_H
+WIN32APIHEADERS=$(shell echo "\#include <winver.h>" | $(CC) -M -E - | tail -1 | sed -e 's![\\/]winver.h!!' | tr -d '\015')
 
 all : \
        ../config.h     \
@@ -336,57 +335,48 @@ gtkmarshal.h gtkmarshal.c : gtkmarshal.list genmarshal.pl
 gtk-$(GTK_VER).dll : generated $(gtk_OBJECTS) gtk.def 
        $(GLIB)/build-dll gtk $(GTK_VER) gtk.def $(gtk_OBJECTS) -L ../gdk -lgdk-$(GTK_VER) -L$(INTL) -lgnu-intl -L $(GLIB) -lglib-$(GLIB_VER) -L $(GLIB)/gmodule -lgmodule-$(GLIB_VER) -L $(GLIB)/gobject -lgobject-$(GLIB_VER) -luser32
 
-.SUFFIXES: .c .o .i
-
-# General rule for compiling the objects into the DLL
-.c.o :
-       $(CC) $(CFLAGS) -c -DGTK_COMPILATION -DG_LOG_DOMAIN=\"Gtk\" $<
-
-.c.i :
-       $(CC) $(CFLAGS) -E -DGTK_COMPILATION -DG_LOG_DOMAIN=\"Gtk\" $< >$@
-
 #
 # Test programs:
 #
 testdnd.exe : testdnd.o
-       $(CC) $(CFLAGS) -o $@ testdnd.o -L . -lgtk-$(GTK_VER) -L ../gdk -lgdk-$(GTK_VER) -L $(GLIB) -lglib-$(GLIB_VER) -L $(GLIB)/gobject -lgobject-$(GLIB_VER) $(LDFLAGS)
+       $(CC) $(CFLAGS) -o $@ testdnd.o -L . -lgtk-$(GTK_VER) -L ../gdk -lgdk-$(GTK_VER) $(GLIB_LIBS) $(LDFLAGS)
 
 # Must have separate rules for these objects that don't go in the DLL
 testdnd.o : testdnd.c
        $(CC) $(CFLAGS) -c -DG_LOG_DOMAIN=\"testdnd\" testdnd.c
 
 testgtk.exe : testgtk.o
-       $(CC) $(CFLAGS) -o $@  testgtk.o -L . -lgtk-$(GTK_VER) -L ../gdk -lgdk-$(GTK_VER) -L $(GLIB) -lglib-$(GLIB_VER) -L $(GLIB)/gobject -lgobject-$(GLIB_VER) $(LDFLAGS)
+       $(CC) $(CFLAGS) -o $@  testgtk.o -L . -lgtk-$(GTK_VER) -L ../gdk -lgdk-$(GTK_VER) $(GLIB_LIBS) $(LDFLAGS)
 
 testgtk.o : testgtk.c
        $(CC) $(CFLAGS) -c -DG_LOG_DOMAIN=\"testgtk\" testgtk.c
 
 testinput.exe : testinput.o
-       $(CC) $(CFLAGS) -o $@  testinput.o -L . -lgtk-$(GTK_VER) -L ../gdk -lgdk-$(GTK_VER) -L $(GLIB) -lglib-$(GLIB_VER) -L $(GLIB)/gobject -lgobject-$(GLIB_VER) $(LDFLAGS)
+       $(CC) $(CFLAGS) -o $@  testinput.o -L . -lgtk-$(GTK_VER) -L ../gdk -lgdk-$(GTK_VER) $(GLIB_LIBS) $(LDFLAGS)
 
 testinput.o : testinput.c
        $(CC) $(CFLAGS) -c -DG_LOG_DOMAIN=\"testinput\" testinput.c
 
 testrgb.exe : testrgb.o
-       $(CC) $(CFLAGS) -o $@  testrgb.o -L . -lgtk-$(GTK_VER) -L ../gdk -lgdk-$(GTK_VER) -L $(GLIB) -lglib-$(GLIB_VER) -L $(GLIB)/gobject -lgobject-$(GLIB_VER) $(LDFLAGS)
+       $(CC) $(CFLAGS) -o $@  testrgb.o -L . -lgtk-$(GTK_VER) -L ../gdk -lgdk-$(GTK_VER) $(GLIB_LIBS) $(LDFLAGS)
 
 testrgb.o : testrgb.c
        $(CC) $(CFLAGS) -c -DG_LOG_DOMAIN=\"testrgb\" testrgb.c
 
 testselection.exe : testselection.o
-       $(CC) $(CFLAGS) -o $@  testselection.o -L . -lgtk-$(GTK_VER) -L ../gdk -lgdk-$(GTK_VER) -L $(GLIB) -lglib-$(GLIB_VER) -L $(GLIB)/gobject -lgobject-$(GLIB_VER)    $(LDFLAGS)
+       $(CC) $(CFLAGS) -o $@  testselection.o -L . -lgtk-$(GTK_VER) -L ../gdk -lgdk-$(GTK_VER) $(GLIB_LIBS) $(LDFLAGS)
 
 testselection.o : testselection.c
        $(CC) $(CFLAGS) -c -DG_LOG_DOMAIN=\"testselection\" testselection.c
 
 testthreads.exe : testthreads.o
-       $(CC) $(CFLAGS) -o $@  testthreads.o -L . -lgtk-$(GTK_VER) -L ../gdk -lgdk-$(GTK_VER) -L $(GLIB) -lglib-$(GLIB_VER) -L $(GLIB)/gthread -lgthread-$(GLIB_VER) -L $(GLIB)/gobject -lgobject-$(GLIB_VER) $(PTHREAD_LIB) $(LDFLAGS)
+       $(CC) $(CFLAGS) -o $@  testthreads.o -L . -lgtk-$(GTK_VER) -L ../gdk -lgdk-$(GTK_VER) $(GLIB_LIBS) $(PTHREAD_LIB) $(LDFLAGS)
 
 testthreads.o : testthreads.c
        $(CC) $(CFLAGS) -I$(PTHREAD_INC) -c -DG_LOG_DOMAIN=\"testthreads\" -DUSE_PTHREADS=1 testthreads.c
 
 simple.exe : simple.o
-       $(CC) $(CFLAGS) -o $@  simple.o -L . -lgtk-$(GTK_VER) -L ../gdk -lgdk-$(GTK_VER) -L $(GLIB) -lglib-$(GLIB_VER) -L $(GLIB)/gobject -lgobject-$(GLIB_VER) $(LDFLAGS)
+       $(CC) $(CFLAGS) -o $@  simple.o -L . -lgtk-$(GTK_VER) -L ../gdk -lgdk-$(GTK_VER) $(GLIB_LIBS) $(LDFLAGS)
 
 simple.o : simple.c
        $(CC) $(CFLAGS) -c -DG_LOG_DOMAIN=\"simple\" simple.c
@@ -394,7 +384,3 @@ simple.o : simple.c
 # The rmgen target removes just the generated source files
 rmgen:
        -rm $(GENERATED)
-
-# The clean target doesn't remove the generated sources
-clean:
-       -rm *.exe *.o *.dll *.a *.exp *.base